/**
 * 
 */
package base.jdk;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;

/**
 * @author bliu
 *
 */
public class TimeFormatTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		//SimpleDateFormat sdf1 = new SimpleDateFormat("dd MMMM yyyy",  Locale.ENGLISH); 
		 SimpleDateFormat sdf = new SimpleDateFormat("dd-MMM-yy",  Locale.ENGLISH); 
		 System.out.println( sdf.format(new Date()));
		 
		 
		Calendar calendar = Calendar.getInstance(Locale.ENGLISH);
		System.out.println(String.format("%1$tY-%1$tm-%1$td", calendar));
		
		System.out.println(new Date().toString());
		
		
		SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MMM-yy",  Locale.ENGLISH);
		String downloadFileName = "p449244_RequestedSubParam_${date}.zip".replace("${date}",dateFormat.format(new Date()));
		System.out.println(downloadFileName);
	}

}
